#!/bin/bash
echo ""
echo "*** Opera Installation ***"
echo "***    Version 9.25    ***"
echo "***     www.x2on.de    ***"
echo ""
echo "Opera herunterladen..."
sudo wget http://www.opera.com/download/get.pl?id=30464
echo "Opera Installieren..."
sudo dpkg -i opera_9.25-20071214.6-shared-qt_en_i386.deb 
echo "Deutsche Sprachdatei herunterladen..."
sudo wget -nv http://www.opera.com/download/lng/925/ouw925_de.lng -O /usr/share/opera/locale/german.lng
echo "Icons für Easy-Mode herunterladen..."
sudo wget -nv http://www.x2on.de/eeepc/opera_norm.png -O /opt/xandros/share/AsusLauncher/opera_norm.png
sudo wget -nv http://www.x2on.de/eeepc/accessibility_opera_hi.png -O /opt/xandros/share/AsusLauncher/accessibility_opera_hi.png
sudo wget -nv http://www.x2on.de/eeepc/business_opera_hi.png -O /opt/xandros/share/AsusLauncher/business_opera_hi.png
sudo wget -nv http://www.x2on.de/eeepc/home_opera_hi.png -O /opt/xandros/share/AsusLauncher/home_opera_hi.png
sudo wget -nv http://www.x2on.de/eeepc/student_opera_hi.png -O /opt/xandros/share/AsusLauncher/student_opera_hi.png
echo "Backup der Simpleui-XML..."
cp /opt/xandros/share/AsusLauncher/simpleui.rc ~/simpleui.rc.opera
echo "Icons installieren..."
cat /opt/xandros/share/AsusLauncher/simpleui.rc | grep -v /simpleui >/tmp/simpleui.rc.tmp
cat >>/tmp/simpleui.rc.tmp  <<EOF

<parcel simplecat="Internet" extraargs="/usr/bin/opera" icon="opera_norm.png" 
selected_icon="opera_hi.png">
      <name lang="en">Opera</name>
      <name lang="de_DE">Opera</name>
      <desc lang="en">Opera Webbrowser</desc>
</parcel>

</simpleui>

EOF

sudo cp /tmp/simpleui.rc.tmp /opt/xandros/share/AsusLauncher/simpleui.rc
echo "Aufräumen..."
sudo rm opera_9.25-20071214.6-shared-qt_en_i386.deb

